package com.deepglint.source;

import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class SourceTest_File {
    public static void main(String[] args) throws Exception{
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        // 输出有序
        env.setParallelism(1);

        String path = "E:\\work\\flink\\src\\main\\resources\\source.txt";
        DataStream<String> dataSet = env.readTextFile(path);

        dataSet.print();

        env.execute();
    }
}
